﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AtDevice
{
    public interface IGSMInterface
    {
        /// <summary>
        /// Get the device International Mobile Equipment Identity (IMEI) number.
        /// </summary>
        string GetIMEI();

        /// <summary>
        /// Get the International Mobile Subscriber Identity (IMSI) number.
        /// </summary>
        string GetIMSI();        
        /// <summary>
        /// Get the cell id
        /// </summary>
        /// <returns>The cell id or null if not set</returns>
        string GetCellId();
        
        /// <summary>
        /// Check if the modem is not in home network (roaming).
        /// </summary>
        bool IsRoamed();        
        /// <summary>
        /// Get type of the network in use. Possible return values:
        /// Nosignal, GprsNetwork or WcdmaNetwork.
        /// </summary>
        /// <remarks>This is the value returned by AT^SYSINFO command. More accurate
        /// information could be fetched using device specific commands.</remarks>
        NetworkEnum GetNetworkType();

        /// <summary>
        /// Get ICCID.
        /// </summary>
        string GetICCID();

        /// <summary>
        /// Get the device manufacturer name.
        /// </summary>
        string GetManufacturer();

        /// <summary>
        /// Get the device model name.
        /// </summary>
        string GetModel();

        /// <summary>
        /// Get the device revision string.
        /// </summary>
        string GetModelRevision();
        /// <summary>
        /// Get the network name to which the device is connected to.
        /// </summary>
        string GetNetwork();
        
        /// <summary>
        /// Get the signal strength indication in percentage (0-100).
        /// </summary>
        /// <exception cref="UnknownSignalException">Thrown if the signal value is unknown.</exception>
        double GetSignal();

        /// <summary>
        /// Change the PIN number.
        /// </summary>
        /// <param name="currentPin">Current PIN.</param>
        /// <param name="newPin">New PIN to use.</param>
        void ChangePIN(string currentPin, string newPin);
    }
}
